﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Runtime.Validation;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Vendors.Dto
{
    /// <summary>
    /// 新增、编辑页面显示的Dto
    /// </summary>
    [AutoMap(typeof(Entities.Vendor))]
    public class VendorEditDto : FullAuditedEntityDto<Guid>, IValidate, IDoubleWayDto
    {
        /// <summary>
        /// Set null to create a new object. Set user's Id to update a object.
        /// </summary>
        public Guid? Id { get; set; }

        [Required]
        [MaxLength(Entities.Vendor.MaxNameLength)]
        public virtual string Name { get; set; }
        [MaxLength(Entities.Vendor.MaxAddressLength)]
        public virtual string Address { get; set; }
        [MaxLength(Entities.Vendor.MaxContactLength)]
        public virtual string Contact { get; set; }
        [MaxLength(Entities.Vendor.MaxContactTelephoneLength)]
        public virtual string ContactTelephone { get; set; }
        [MaxLength(Entities.Vendor.MaxContactMobileLength)]
        public virtual string ContactMobile { get; set; }
    }
}
